package com.gs.wzweather.dao;


import com.gs.wzweather.dao.mapper.SmsThresholdMapper;
import com.gs.wzweather.entity.SmsThreshold;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Legolas
 * Date: 2017/9/21 0021
 */
@Repository
public class SmsThresholdDao {
    /*
    根据灾害预测名字查询阈值
     */
    private final Logger logger = LoggerFactory.getLogger(this.getClass());
    @Autowired
    SmsThresholdMapper mapper;

    public List<SmsThreshold> querySmsThresholds(){
        try {
            return mapper.querySmsThresholds();
        } catch (Exception e) {
            logger.info("querySmsThresholds->{}",e.getMessage());
            return null;
        }
    }

}
